﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace SimpleBomberman
{
    public class CementWall : Wall
    {
        #region Constructors

        public CementWall() : base() { }
        public CementWall(int x, int y, int length) : base(x, y, length) { }

        #endregion Constructors

        #region Public Override Methods

        public override void Draw(Graphics g)
        {
            Pen silverPen = new Pen(Color.Silver);
            Pen whitePen = new Pen(Color.White, 2);
            Pen blackPen = new Pen(Color.Black, 2);
            Rectangle rectangle = new Rectangle(this.X, this.Y, this.Length - 1, this.Length - 1);
            g.DrawRectangle(silverPen, rectangle);
            g.FillRectangle(Brushes.Silver, rectangle);

            //------- Up line -------
            g.DrawLine(whitePen, this.X + 2, this.Y + 1, this.X + this.Length - 1 - 2, this.Y + 1);
            
            //------- Left line -------
            g.DrawLine(whitePen, this.X + 1, this.Y + 2, this.X + 1, this.Y + this.Length - 1 - 2);
            
            //------- Down lines -------
            g.DrawLine(blackPen, this.X + 2, this.Y + this.Length - 1 - 2, this.X + this.Length - 1 - 2, this.Y + this.Length - 1 - 2);
            g.DrawLine(blackPen, this.X, this.Y + this.Length - 1, this.X + this.Length - 1, this.Y + this.Length - 1);
            
            //------- Right line -------
            g.DrawLine(blackPen, this.X + this.Length - 1, this.Y, this.X + this.Length - 1, this.Y + this.Length - 1 + 1);
        }

        #endregion Public Override Methods
    }
}
